JavaScript
A5.audio.Recordersave Method
Syntax
A5.audio.Recorder.save([fileName])
Arguments
- fileNamestring
The file name to use when saving. This excludes the file extension. If no file name is passed in, a file name will be automatically generated that includes the date, time and length of the recording.
Description
Stop the current recording and save the resulting file. The file will be saved as a "*.M4A".
Example: Saving the Recording for the AudioRecorderAndPlayer Control
The UX Component AudioRecorderAndPlayer control's JavaScript object can be used to save a recording. The _rec property of the object contains the audio recorder class methods. The JavaScript below demonstrates how to save a recording for an AudioRecorderAndPlayer control:
// Get the JavaScript object for the AudioRecorderAndPlayer Control var audioObj = {dialog.object}.getControl("AUDIORECORDERANDPLAYER"); if (audioObj) { // Get the desired filename from a UX control: var fileName = {dialog.object}.getValue("FILENAME"); // Save the recording audioObj._rec.save(fileName); }
See Also